<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ include file="common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<script type="text/javascript">
	$(document).ready(function() {
	
		$("input[name='itemName']").focus();
		$("#searchItemDetail").attr("action",'<c:url value="/viewTransaction.htm"></c:url>');
		createItemAutocomplete('itemName');
		$("#fromDate").datepicker({ duration: 'slow',changeMonth: true, changeYear: true, showOptions: {direction: 'up' }, dateFormat: 'dd-mm-yy' });
		$("#toDate").datepicker({ duration: 'slow',changeMonth: true, changeYear: true, showOptions: {direction: 'up' }, dateFormat: 'dd-mm-yy' });
		var date = new Date();
		$("#toDate").datepicker('setDate', date);
		$("#fromDate").datepicker('setDate', date);
	});
</script>
<div>
<form:form commandName="searchCriteria" id="searchItemDetail" onsubmit="return false;">
	<table class="mainTable">
		<tr>
			<td>
				<form:label path="itemName">Item Name</form:label>
			</td>
			<td>
				<form:input path="itemName"/>
			</td>
		</tr>
		<tr>
			<td>
				<form:label path="fromDate">From Date</form:label>
			</td>
			<td>
				<form:input path="fromDate" id="fromDate"/>
			</td>
		</tr>		
		<tr>
			<td>
				<form:label path="toDate">To Date</form:label>
			</td>
			<td>
				<form:input path="toDate" id="toDate"/>
			</td>
		</tr>		
		<tr>
			<td>
				<input type="button" value="Search" onclick="saveEntity('searchItemDetail')">
			</td>
		</tr>					
	</table>
</form:form>
<!-- <form method="post" action="" id="searchItemDetail">
	<table class="mainTable">
		<tr>
			<td>
				<label class="header2" for="itemName">Item Name</label>:
				<input id="itemName" name="itemName" Class="text ui-widget-content ui-corner-all"
					size="20" maxlength="50" />
			</td>
		</tr>
		<tr>
			<td>
				<label class="header2" for="fromDate">From Date</label>:
				<input id="fromDate" name="fromDate" Class="text ui-widget-content ui-corner-all"
					size="20" maxlength="50" />
			</td>
			<td>
				<label class="header2" for="toDate">To Date</label>:
				<input id="toDate" name="toDate" Class="text ui-widget-content ui-corner-all"
					size="20" maxlength="50" />			
			</td>
		</tr>		
		<tr>
			<td>
				<input type="button" value="Search" onclick="saveEntity('searchItemDetail')">
			</td>
		</tr>	
	</table>
</form> -->
</div>